package cn.zyl.spring.boot.branch.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * IndexController类说明: 测试接口
 *
 * @author z.y.l
 * @version v1.0
 * @date 2020-09-10
 */
@Controller
@RequestMapping("/hello")
public class HelloController {
    private final Logger logger = LoggerFactory.getLogger(HelloController.class);
    @RequestMapping("")
    @ResponseBody
    public String root(){
        return "Hello Spring Boot Demo.By zyl.";
    }
    @RequestMapping("/index")
    public String index(){
        logger.info("go to index.html");
        return "index";
    }
}
